/// @tags:
#include <cctype>
#include <cstdio>

namespace BlueQuantum {

typedef long long ll;

int const N = 1e5 + 5, INF = 0x3f3f3f3f;
double const eps = 1e-7;

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

int T, n, k, L, R, a[N], q[N];

inline bool check(double mid) {
  int head = 0, tail = -1;
  head = 0, tail = -1;
  for (int i = 1, j = 1; i <= n; ++i) {
    while (head <= tail && i - q[head] + 1 > R) head++;
    if (i - j + 1 >= L) {
      while (head <= tail && mid * j - a[j] > mid * q[tail] - a[q[tail]]) tail--;
      q[++tail] = j++;
    }
    if (head <= tail && mid * (i + k) - a[i] <= mid * q[head] - a[q[head]]) return true;
  }
  head = 0, tail = -1;
  for (int i = 1, j = 1; i <= n; i++) {
    while (head <= tail && i - q[head] + 1 > R) head++;
    if (i - j + 1 >= L) {
      while (head <= tail && mid * j + a[j] > mid * q[tail] + a[q[tail]]) tail--;
      q[++tail] = j++;
    }
    if (head <= tail && mid * (i + k) + a[i] <= mid * q[head] + a[q[head]]) return true;
  }
  if (L > 1) {
    head = 0, tail = -1;
    for (int i = 1; i <= n; i++) {
      while (head <= tail && i - q[head] + 1 >= L) head++;
      if (head <= tail && 1.0 * a[i] - a[q[head]] >= mid * (L - 1 + k)) return true;
      while (head <= tail && a[i] <= a[q[tail]]) tail--;
      q[++tail] = i;
    }
    head = 0, tail = -1;
    for (int i = 1; i <= n; i++) {
      while (head <= tail && i - q[head] + 1 >= L) head++;
      if (head <= tail && 1.0 * a[q[head]] - a[i] >= mid * (L - 1 + k)) return true;
      while (head <= tail && a[i] >= a[q[tail]]) tail--;
      q[++tail] = i;
    }
  }
  return false;
}

inline int main() {
  read(T);
  while (T--) {
    read(n), read(k), read(L), read(R);
    int max = 0, min = INF;
    for (int i = 1; i <= n; ++i) {
      read(a[i]);
      max = max < a[i] ? a[i] : max;
      min = min > a[i] ? a[i] : min;
    }
    double l = 0, r = 1.0 * (max - min) / (L - 1 + k), mid;
    while (r - l > eps) {
      mid = (l + r) / 2;
      if (check(mid)) l = mid;
      else
        r = mid;
    }
    printf("%.4lf\n", l);
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("extreme.in", "r", stdin);
  freopen("extreme.out", "w", stdout);
#endif
#endif

  return BlueQuantum::main();
}